﻿@using MealBooking.Core.Models.Dishes;
@model List<DishCategory>
@{
    Layout = "../Shared/_Layout.cshtml";
}
@{
    ViewBag.HeaderTitle = "All Dish Categories";
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    @Html.Partial("_FloatRightPartial")
</div>
<!--Navbar End-->
<ul data-role="listview" data-inset="true" data-mini="true">
    @{
        var dishCategories = Model;
        if (dishCategories == null || dishCategories.Count == 0)
        {
        <li data-role="list-divider"></li>
        <li><a href="@Url.Action("AddNewDishCategory")">No Dish Categories Yet. Click to Add
            New Dish Category</a></li>
        }
        else
        {
        <li data-role="list-divider"><span class="ui-li-count">@dishCategories.Count</span>
        </li>
            foreach (var dishCategory in dishCategories)
            {
        <li><a href="@Url.Action("DishCategoryDetail", new { id = dishCategory.Id })">
            <h4>@dishCategory.Name</h4>
            <p>@dishCategory.Description</p>
        </a></li>
            }
        }
    }
</ul>
